import os
from fnmatch import fnmatch

def find(path, pattern):
    result = []
    for root, dirs, files in os.walk(path):
        for file in files:
            if fnmatch(file, pattern):
                result.append(os.path.join(root, file))
    return result

if __name__ == '__main__':
    find('d:/', '*.txt')